﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <script src="Common.js" type="text/javascript"></script>
    <script type="text/javascript">



        BindEvent(window, "load", function (e) {

            // innerHTML
            /*
            alert(Get("divTest").innerHTML);
            if (typeof Get("divTest").innerText != "undefined") {
            // innerText ie
            alert(Get("divTest").innerText);
            }
            else {
            // textContent ff
            alert(Get("divTest").textContent);
            }
            */

            /*
            Get("divTest").innerText = "<input type='text' value='abc' />";
            //Get("divTest").innerHTML = "<input type='text' value='abc' />";

            BindEvent("btnShow", "click", function (e) {
            Get("divShow").innerHTML += "<input type='text' value='abc' />";

            });
            */

            //alert(Get("divTest").outerHTML);
            //alert(Get("divTest").outerText);
            //Get("divTest").outerText = "aaaaa";
        });
    
    </script>
</head>
<body>
    <input type="button" value="add" id="btnShow" />
    <div id="divShow"></div>
    <div id="divTest">
        abc
        <span id="spaTest">123</span>
        <span>567</span>
    </div>
</body>
</html>
